import { Request } from "@/views/util/request";
//获取设备管理列表
async function getDeviveMangeList(data){
    return await Request.post('/garbageSys/exceptionManager/getList',data)
}
//获取设备指令列表
async function getInstructionList(data){
    return await Request.post('/garbageSys/instruction/getList',data)
}
//添加设备
async function addDevice(data){
    return await Request.post('/garbageSys/exceptionManager/insert',data)
}
//获取设备详情
async function getDeviceDetails(data){
    return await Request.get(`/garbageSys/exceptionManager/getInfo/${data.id}`,data)
}
//获取全部清洁人员
async function getAllCleaner(data){
    return await Request.post('/garbageSys/removal/getCleaner',data)
}
//编辑设备
async function modifyDevice(data){
    return await Request.post('/garbageSys/exceptionManager/update',data)
}
//获取设备编号或者设备地点
async function getDevideCodeOrAddress(data){
    return await Request.post('/garbageSys/exceptionManager/getEquipment',data)
}
//设备定时重启
async function deviceScheduledRestart(data){
    return await Request.post(`/garbageSys/instruction/add`,data)
}
//单个设备重启
async function onceDeviceRestart(data){
    return await Request.get(`/garbageSys/instruction/restart/${data.id}`,data)
}
//获取所有组织机构
async function getCompanyList(data){
    return await Request.post('/garbageSys/exceptionManager/getCompanyList',data)
}
export {getInstructionList,getDeviveMangeList,addDevice,getDeviceDetails,getAllCleaner,modifyDevice,getDevideCodeOrAddress,deviceScheduledRestart,onceDeviceRestart,getCompanyList}